import axios from 'axios'
import qs from 'qs'

/**
 *  server api配置
 */
const appExists = (params) => axios.post('/app/exists', params)
const appList = (params) => axios.get('/app/list', params)

const baseTableList = (params) => axios.get('/baseTable/list', params)
const appAdd = (params) => axios.post('/app/add', params)
const appDelete = (params) => axios.delete('/app/delete', { params: params, paramsSerializer: p => { return qs.stringify(p, { indices: false }) } })
const appUpdate = (params) => axios.put('/app/update', params)
const appStart = (params) => axios.post('/app/start', params)
const appStop = (params) => axios.post('/app/stop', params)
export { appExists, appList, appAdd, appDelete, appUpdate, baseTableList, appStart, appStop }
